package com.work.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.work.converter.LocalDateTimeConverter;
import lombok.Data;

import java.net.URL;
import java.time.LocalDateTime;

@Data
public class ExcelVo {

    //学院、专业、班级、学号、身份证号、报道时间（yyyy-MM-dd  HH:mm:ss）、照片、状态（在校、辍学）

    //学院名称
    @ColumnWidth(35)
    @ExcelProperty(value = "学院",index = 0)
    private String academyName;

    //专业名称
    @ColumnWidth(35)
    @ExcelProperty(value = "专业",index = 1)
    private String majorName;

    //班级名称
    @ColumnWidth(35)
    @ExcelProperty(value = "班级",index = 2)
    private String className;

    //学号
    @ColumnWidth(35)
    @ExcelProperty(value = "学号",index = 3)
    private String stuNumber;

    //身份证号
    @ColumnWidth(35)
    @ExcelProperty(value = "身份证号",index = 4)
    private String stuPersonNumber;

    //学生照片
    @ColumnWidth(35)

    @ExcelProperty(value = "照片",index = 5)
    private URL stuPicture;

    //入学时间
    @ColumnWidth(35)
    @ExcelProperty(value = "报道时间",index = 6,converter = LocalDateTimeConverter.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime stuTime;

    //状态
    @ColumnWidth(35)
    @ExcelProperty(value = "状态",index = 7)
    private String stuStatus;

    //学院id
    private Integer academyId;

    //专业id
    private Integer majorId;

    //班级id
    private Integer classId;
}
